package com.dylon.system.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

@Data
public class SysInterface extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long    interfaceId;
    private Long    moduleId; //'所属模块',
    private String  interfaceName; //'接口名称',
    private String  url; //'请求地址',
    private String  status; //'状态：0正常，1弃用',
    private String  reqType; //'请求方式',
    private String  reqProtocol; //'请求协议',
    private String  reqDataType; //'请求数据格式',
    private String  respDataType; //'请求响应返回数据格式',
    private String  operation; //'接口标识，反向生成代码',
    private String  devStatus; //'开发状态：0进行中，1已完成',
    private Integer orderNum; //'排序号',

    private SysModule module; //所属模块

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("interfaceId", getInterfaceId())
                .append("moduleId", getModuleId())
                .append("interfaceName", getInterfaceName())
                .append("url", getUrl())
                .append("status", getStatus())
                .append("reqType", getReqType())
                .append("reqProtocol", getReqProtocol())
                .append("reqDataType", getReqDataType())
                .append("respDataType", getRespDataType())
                .append("operation", getOperation())
                .append("devStatus", getDevStatus())
                .append("orderNum", getOrderNum())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("moduleName", getModule().getModuleName())
                .toString();
    }
}
